<template>
  <div>
    <el-card shadow="never" class="mb20">
      <scheme-form ref="schemeForm" @search="handleRefresh" />
    </el-card>
    <el-card shadow="never">
      <div style="text-align: right" class="mb20">
        <el-tooltip class="item" content="新增考评" effect="dark" placement="top">
          <el-button
            type="primary"
            icon="el-icon-plus"
            @click="$router.push({ name: 'moralityCreateScheme' })"
          />
        </el-tooltip>
      </div>
      <scheme-list ref="schemeList" />
    </el-card>
  </div>
</template>

<script>
import SchemeList from './SchemeList'
import SchemeForm from './SchemeForm'

export default {
  components: {
    SchemeList,
    SchemeForm
  },
  methods: {
    handleEdit(bool, obj) {
      // this.$refs.defineModal.edit(bool, obj)
      this.$router.push({
        name: 'moralityCreateScheme'
      })
    },
    handleRefresh(param = {}) {
      this.$refs.defineTable.handleGetList(param)
    }
  }
}
</script>
